home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / xulapp / nsIProfileMigrator.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  7KB  |  237 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIProfileMigrator.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIProfileMigrator_h__
  6. #define __gen_nsIProfileMigrator_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsIFile; /* forward declaration */
  18.  
  19.  
  20. /* starting interface:    nsIProfileStartup */
  21. #define NS_IPROFILESTARTUP_IID_STR "048e5ca1-0eb7-4bb1-a9a2-a36f7d4e0e3c"
  22.  
  23. #define NS_IPROFILESTARTUP_IID \
  24.   {0x048e5ca1, 0x0eb7, 0x4bb1, \
  25.     { 0xa9, 0xa2, 0xa3, 0x6f, 0x7d, 0x4e, 0x0e, 0x3c }}
  26.  
  27. /**
  28.  * Helper interface for nsIProfileMigrator.
  29.  *
  30.  * @provider Toolkit (Startup code)
  31.  * @client   Application (Profile-migration code)
  32.  * @obtainable nsIProfileMigrator.migrate
  33.  */
  34. class NS_NO_VTABLE nsIProfileStartup : public nsISupports {
  35.  public: 
  36.  
  37.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPROFILESTARTUP_IID)
  38.  
  39.   /**
  40.    * The root directory of the semi-current profile, during profile migration.
  41.    * After nsIProfileMigrator.migrate has returned, this object will not be
  42.    * useful.
  43.    */
  44.   /* readonly attribute nsIFile directory; */
  45.   NS_IMETHOD GetDirectory(nsIFile * *aDirectory) = 0;
  46.  
  47.   /**
  48.    * Do profile-startup by setting NS_APP_USER_PROFILE_50_DIR in the directory
  49.    * service and notifying the profile-startup observer topics.
  50.    */
  51.   /* void doStartup (); */
  52.   NS_IMETHOD DoStartup(void) = 0;
  53.  
  54. };
  55.  
  56. /* Use this macro when declaring classes that implement this interface. */
  57. #define NS_DECL_NSIPROFILESTARTUP \
  58.   NS_IMETHOD GetDirectory(nsIFile * *aDirectory); \
  59.   NS_IMETHOD DoStartup(void); 
  60.  
  61. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  62. #define NS_FORWARD_NSIPROFILESTARTUP(_to) \
  63.   NS_IMETHOD GetDirectory(nsIFile * *aDirectory) { return _to GetDirectory(aDirectory); } \
  64.   NS_IMETHOD DoStartup(void) { return _to DoStartup(); } 
  65.  
  66. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  67. #define NS_FORWARD_SAFE_NSIPROFILESTARTUP(_to) \
  68.   NS_IMETHOD GetDirectory(nsIFile * *aDirectory) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDirectory(aDirectory); } \
  69.   NS_IMETHOD DoStartup(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->DoStartup(); } 
  70.  
  71. #if 0
  72. /* Use the code below as a template for the implementation class for this interface. */
  73.  
  74. /* Header file */
  75. class nsProfileStartup : public nsIProfileStartup
  76. {
  77. public:
  78.   NS_DECL_ISUPPORTS
  79.   NS_DECL_NSIPROFILESTARTUP
  80.  
  81.   nsProfileStartup();
  82.  
  83. private:
  84.   ~nsProfileStartup();
  85.  
  86. protected:
  87.   /* additional members */
  88. };
  89.  
  90. /* Implementation file */
  91. NS_IMPL_ISUPPORTS1(nsProfileStartup, nsIProfileStartup)
  92.  
  93. nsProfileStartup::nsProfileStartup()
  94. {
  95.   /* member initializers and constructor code */
  96. }
  97.  
  98. nsProfileStartup::~nsProfileStartup()
  99. {
  100.   /* destructor code */
  101. }
  102.  
  103. /* readonly attribute nsIFile directory; */
  104. NS_IMETHODIMP nsProfileStartup::GetDirectory(nsIFile * *aDirectory)
  105. {
  106.     return NS_ERROR_NOT_IMPLEMENTED;
  107. }
  108.  
  109. /* void doStartup (); */
  110. NS_IMETHODIMP nsProfileStartup::DoStartup()
  111. {
  112.     return NS_ERROR_NOT_IMPLEMENTED;
  113. }
  114.  
  115. /* End of implementation class template. */
  116. #endif
  117.  
  118.  
  119. /* starting interface:    nsIProfileMigrator */
  120. #define NS_IPROFILEMIGRATOR_IID_STR "24ce8b9d-b7ff-4279-aef4-26e158f03e34"
  121.  
  122. #define NS_IPROFILEMIGRATOR_IID \
  123.   {0x24ce8b9d, 0xb7ff, 0x4279, \
  124.     { 0xae, 0xf4, 0x26, 0xe1, 0x58, 0xf0, 0x3e, 0x34 }}
  125.  
  126. /**
  127.  * Migrate application settings from an outside source.
  128.  *
  129.  * @provider Application (Profile-migration code)
  130.  * @client   Toolkit (Startup code)
  131.  * @obtainable service, contractid("@mozilla.org/toolkit/profile-migrator;1")
  132.  */
  133. class NS_NO_VTABLE nsIProfileMigrator : public nsISupports {
  134.  public: 
  135.  
  136.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPROFILEMIGRATOR_IID)
  137.  
  138.   /**
  139.    * Import existing profile paths.  When the app is started the first
  140.    * time, if there are no INI-style profiles, appstartup will call
  141.    * this method to import any registry- style profiles that may
  142.    * exist. When this method is called, there is no event queue
  143.    * service and this method should not attempt to use the network or
  144.    * show any GUI.
  145.    *
  146.    * @note You don't actually have to move the profile data. Just call
  147.    *       nsIToolkitProfileService.create on the existing profile path(s).
  148.    */
  149.   /* void import (); */
  150.   NS_IMETHOD Import(void) = 0;
  151.  
  152.   /**
  153.    * Do profile migration.
  154.    *
  155.    * When this method is called, a default profile has been created;
  156.    * XPCOM has been initialized such that compreg.dat is in the
  157.    * profile; the directory service does *not* return a key for
  158.    * NS_APP_USER_PROFILE_50_DIR or any of the keys depending on an active
  159.    * profile. To figure out the directory of the "current" profile, use
  160.    * aStartup.directory.
  161.    *
  162.    * If your migrator needs to access services that use the profile (to
  163.    * set profile prefs or bookmarks, for example), use aStartup.doStartup.
  164.    *
  165.    * The startup code ignores COM exceptions thrown from this method.
  166.    */
  167.   /* void migrate (in nsIProfileStartup aStartup); */
  168.   NS_IMETHOD Migrate(nsIProfileStartup *aStartup) = 0;
  169.  
  170. };
  171.  
  172. /* Use this macro when declaring classes that implement this interface. */
  173. #define NS_DECL_NSIPROFILEMIGRATOR \
  174.   NS_IMETHOD Import(void); \
  175.   NS_IMETHOD Migrate(nsIProfileStartup *aStartup); 
  176.  
  177. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  178. #define NS_FORWARD_NSIPROFILEMIGRATOR(_to) \
  179.   NS_IMETHOD Import(void) { return _to Import(); } \
  180.   NS_IMETHOD Migrate(nsIProfileStartup *aStartup) { return _to Migrate(aStartup); } 
  181.  
  182. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  183. #define NS_FORWARD_SAFE_NSIPROFILEMIGRATOR(_to) \
  184.   NS_IMETHOD Import(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Import(); } \
  185.   NS_IMETHOD Migrate(nsIProfileStartup *aStartup) { return !_to ? NS_ERROR_NULL_POINTER : _to->Migrate(aStartup); } 
  186.  
  187. #if 0
  188. /* Use the code below as a template for the implementation class for this interface. */
  189.  
  190. /* Header file */
  191. class nsProfileMigrator : public nsIProfileMigrator
  192. {
  193. public:
  194.   NS_DECL_ISUPPORTS
  195.   NS_DECL_NSIPROFILEMIGRATOR
  196.  
  197.   nsProfileMigrator();
  198.  
  199. private:
  200.   ~nsProfileMigrator();
  201.  
  202. protected:
  203.   /* additional members */
  204. };
  205.  
  206. /* Implementation file */
  207. NS_IMPL_ISUPPORTS1(nsProfileMigrator, nsIProfileMigrator)
  208.  
  209. nsProfileMigrator::nsProfileMigrator()
  210. {
  211.   /* member initializers and constructor code */
  212. }
  213.  
  214. nsProfileMigrator::~nsProfileMigrator()
  215. {
  216.   /* destructor code */
  217. }
  218.  
  219. /* void import (); */
  220. NS_IMETHODIMP nsProfileMigrator::Import()
  221. {
  222.     return NS_ERROR_NOT_IMPLEMENTED;
  223. }
  224.  
  225. /* void migrate (in nsIProfileStartup aStartup); */
  226. NS_IMETHODIMP nsProfileMigrator::Migrate(nsIProfileStartup *aStartup)
  227. {
  228.     return NS_ERROR_NOT_IMPLEMENTED;
  229. }
  230.  
  231. /* End of implementation class template. */
  232. #endif
  233.  
  234. #define NS_PROFILEMIGRATOR_CONTRACTID "@mozilla.org/toolkit/profile-migrator;1"
  235.  
  236. #endif /* __gen_nsIProfileMigrator_h__ */
  237.